<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
<script type="text/javascript">/* <![CDATA[ */
function get_sym_list(){return [];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class="c">/*</span>
<a class="l" name="2" href="#2">2</a><span class="c"> * MIT License</span>
<a class="l" name="3" href="#3">3</a><span class="c"> *</span>
<a class="l" name="4" href="#4">4</a><span class="c"> * Copyright (c) 2018 SCARV Project - &lt;info@scarv.org&gt;</span>
<a class="l" name="5" href="#5">5</a><span class="c"> *</span>
<a class="l" name="6" href="#6">6</a><span class="c"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span>
<a class="l" name="7" href="#7">7</a><span class="c"> * of this software and associated documentation files (the &quot;Software&quot;), to deal</span>
<a class="l" name="8" href="#8">8</a><span class="c"> * in the Software without restriction, including without limitation the rights</span>
<a class="l" name="9" href="#9">9</a><span class="c"> * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span>
<a class="hl" name="10" href="#10">10</a><span class="c"> * copies of the Software, and to permit persons to whom the Software is</span>
<a class="l" name="11" href="#11">11</a><span class="c"> * furnished to do so, subject to the following conditions:</span>
<a class="l" name="12" href="#12">12</a><span class="c"> *</span>
<a class="l" name="13" href="#13">13</a><span class="c"> * The above copyright notice and this permission notice shall be included in all</span>
<a class="l" name="14" href="#14">14</a><span class="c"> * copies or substantial portions of the Software.</span>
<a class="l" name="15" href="#15">15</a><span class="c"> *</span>
<a class="l" name="16" href="#16">16</a><span class="c"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span>
<a class="l" name="17" href="#17">17</a><span class="c"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span>
<a class="l" name="18" href="#18">18</a><span class="c"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span>
<a class="l" name="19" href="#19">19</a><span class="c"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span>
<a class="hl" name="20" href="#20">20</a><span class="c"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span>
<a class="l" name="21" href="#21">21</a><span class="c"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span>
<a class="l" name="22" href="#22">22</a><span class="c"> * SOFTWARE.</span>
<a class="l" name="23" href="#23">23</a><span class="c"> */</span>
<a class="l" name="24" href="#24">24</a>
<a class="l" name="25" href="#25">25</a><span class="c">//</span>
<a class="l" name="26" href="#26">26</a><span class="c">// SCARV Project</span>
<a class="l" name="27" href="#27">27</a><span class="c">//</span>
<a class="l" name="28" href="#28">28</a><span class="c">// University of Bristol</span>
<a class="l" name="29" href="#29">29</a><span class="c">//</span>
<a class="hl" name="30" href="#30">30</a><span class="c">// RISC-V Cryptographic Instruction Set Extension</span>
<a class="l" name="31" href="#31">31</a><span class="c">//</span>
<a class="l" name="32" href="#32">32</a><span class="c">// Reference Implementation</span>
<a class="l" name="33" href="#33">33</a><span class="c">//</span>
<a class="l" name="34" href="#34">34</a><span class="c">//</span>
<a class="l" name="35" href="#35">35</a>
<a class="l" name="36" href="#36">36</a><b>localparam</b> \<a href="/source/s?defs=SCARV_COP_INSN_SUCCESS" class="intelliWindow-symbol" data-definition-place="undefined-in-file">SCARV_COP_INSN_SUCCESS</a> =  <span class="n">3&apos;b000</span>;
<a class="l" name="37" href="#37">37</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_ABORT"/><a href="/source/s?refs=SCARV_COP_INSN_ABORT" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_ABORT</a>   =  <span class="n">3&apos;b001</span>;
<a class="l" name="38" href="#38">38</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_BAD_INS"/><a href="/source/s?refs=SCARV_COP_INSN_BAD_INS" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_BAD_INS</a> =  <span class="n">3&apos;b010</span>;
<a class="l" name="39" href="#39">39</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_BAD_LAD"/><a href="/source/s?refs=SCARV_COP_INSN_BAD_LAD" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_BAD_LAD</a> =  <span class="n">3&apos;b100</span>;
<a class="hl" name="40" href="#40">40</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_BAD_SAD"/><a href="/source/s?refs=SCARV_COP_INSN_BAD_SAD" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_BAD_SAD</a> =  <span class="n">3&apos;b101</span>;
<a class="l" name="41" href="#41">41</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_LD_ERR"/><a href="/source/s?refs=SCARV_COP_INSN_LD_ERR" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_LD_ERR</a>  =  <span class="n">3&apos;b110</span>;
<a class="l" name="42" href="#42">42</a><b>localparam</b> <a class="d" name="SCARV_COP_INSN_ST_ERR"/><a href="/source/s?refs=SCARV_COP_INSN_ST_ERR" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_INSN_ST_ERR</a>  =  <span class="n">3&apos;b111</span>;
<a class="l" name="43" href="#43">43</a><b>localparam</b> \<a href="/source/s?defs=module" class="intelliWindow-symbol" data-definition-place="undefined-in-file">module</a>  =  <span class="n">3&apos;b111</span>;
<a class="l" name="44" href="#44">44</a>
<a class="l" name="45" href="#45">45</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_PACKED_ARITH"/><a href="/source/s?refs=SCARV_COP_ICLASS_PACKED_ARITH" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_PACKED_ARITH</a> = <span class="n">4&apos;b0001</span>;
<a class="l" name="46" href="#46">46</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_TWIDDLE"/><a href="/source/s?refs=SCARV_COP_ICLASS_TWIDDLE" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_TWIDDLE</a>      = <span class="n">4&apos;b0010</span>;
<a class="l" name="47" href="#47">47</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_LOADSTORE"/><a href="/source/s?refs=SCARV_COP_ICLASS_LOADSTORE" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_LOADSTORE</a>    = <span class="n">4&apos;b0011</span>;
<a class="l" name="48" href="#48">48</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_RANDOM"/><a href="/source/s?refs=SCARV_COP_ICLASS_RANDOM" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_RANDOM</a>       = <span class="n">4&apos;b0100</span>;
<a class="l" name="49" href="#49">49</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_MOVE"/><a href="/source/s?refs=SCARV_COP_ICLASS_MOVE" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_MOVE</a>         = <span class="n">4&apos;b0101</span>;
<a class="hl" name="50" href="#50">50</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_MP"/><a href="/source/s?refs=SCARV_COP_ICLASS_MP" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_MP</a>           = <span class="n">4&apos;b0110</span>;
<a class="l" name="51" href="#51">51</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_BITWISE"/><a href="/source/s?refs=SCARV_COP_ICLASS_BITWISE" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_BITWISE</a>      = <span class="n">4&apos;b0111</span>;
<a class="l" name="52" href="#52">52</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_AES"/><a href="/source/s?refs=SCARV_COP_ICLASS_AES" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_AES</a>          = <span class="n">4&apos;b1000</span>;
<a class="l" name="53" href="#53">53</a><b>localparam</b> <a class="d" name="SCARV_COP_ICLASS_SHA3"/><a href="/source/s?refs=SCARV_COP_ICLASS_SHA3" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_ICLASS_SHA3</a>         = <span class="n">4&apos;b1001</span>;
<a class="l" name="54" href="#54">54</a>
<a class="l" name="55" href="#55">55</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SHA3_XY"/><a href="/source/s?refs=SCARV_COP_SCLASS_SHA3_XY" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SHA3_XY</a>   = <span class="n">5&apos;b11000</span>;
<a class="l" name="56" href="#56">56</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SHA3_X1"/><a href="/source/s?refs=SCARV_COP_SCLASS_SHA3_X1" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SHA3_X1</a>   = <span class="n">5&apos;b11001</span>;
<a class="l" name="57" href="#57">57</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SHA3_X2"/><a href="/source/s?refs=SCARV_COP_SCLASS_SHA3_X2" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SHA3_X2</a>   = <span class="n">5&apos;b11010</span>;
<a class="l" name="58" href="#58">58</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SHA3_X4"/><a href="/source/s?refs=SCARV_COP_SCLASS_SHA3_X4" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SHA3_X4</a>   = <span class="n">5&apos;b11100</span>;
<a class="l" name="59" href="#59">59</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SHA3_YX"/><a href="/source/s?refs=SCARV_COP_SCLASS_SHA3_YX" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SHA3_YX</a>   = <span class="n">5&apos;b11011</span>;
<a class="hl" name="60" href="#60">60</a>
<a class="l" name="61" href="#61">61</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SCATTER_B"/><a href="/source/s?refs=SCARV_COP_SCLASS_SCATTER_B" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SCATTER_B</a> = <span class="n">5&apos;d0</span> ;
<a class="l" name="62" href="#62">62</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_GATHER_B"/><a href="/source/s?refs=SCARV_COP_SCLASS_GATHER_B" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_GATHER_B</a>  = <span class="n">5&apos;d1</span> ;
<a class="l" name="63" href="#63">63</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_SCATTER_H"/><a href="/source/s?refs=SCARV_COP_SCLASS_SCATTER_H" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_SCATTER_H</a> = <span class="n">5&apos;d2</span> ;
<a class="l" name="64" href="#64">64</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_GATHER_H"/><a href="/source/s?refs=SCARV_COP_SCLASS_GATHER_H" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_GATHER_H</a>  = <span class="n">5&apos;d3</span> ;
<a class="l" name="65" href="#65">65</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_ST_W"/><a href="/source/s?refs=SCARV_COP_SCLASS_ST_W" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_ST_W</a>      = <span class="n">5&apos;d4</span> ;
<a class="l" name="66" href="#66">66</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_LD_W"/><a href="/source/s?refs=SCARV_COP_SCLASS_LD_W" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_LD_W</a>      = <span class="n">5&apos;d5</span> ;
<a class="l" name="67" href="#67">67</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_ST_H"/><a href="/source/s?refs=SCARV_COP_SCLASS_ST_H" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_ST_H</a>      = <span class="n">5&apos;d6</span> ;
<a class="l" name="68" href="#68">68</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_LH_CR"/><a href="/source/s?refs=SCARV_COP_SCLASS_LH_CR" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_LH_CR</a>     = <span class="n">5&apos;d7</span> ;
<a class="l" name="69" href="#69">69</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_ST_B"/><a href="/source/s?refs=SCARV_COP_SCLASS_ST_B" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_ST_B</a>      = <span class="n">5&apos;d8</span> ;
<a class="hl" name="70" href="#70">70</a><b>localparam</b> <a class="d" name="SCARV_COP_SCLASS_LB_CR"/><a href="/source/s?refs=SCARV_COP_SCLASS_LB_CR" class="d intelliWindow-symbol" data-definition-place="def">SCARV_COP_SCLASS_LB_CR</a>     = <span class="n">5&apos;d9</span> ;
<a class="l" name="71" href="#71">71</a>
<a class="l" name="72" href="#72">72</a><b>`ifdef</b> <a href="/source/s?defs=FORMAL" class="intelliWindow-symbol" data-definition-place="undefined-in-file">FORMAL</a>
<a class="l" name="73" href="#73">73</a><b>`include</b> <span class="s">&quot;fml_common.vh&quot;</span>
<a class="l" name="74" href="#74">74</a><b>`endif</b>
<a class="l" name="75" href="#75">75</a>
<a class="l" name="76" href="#76">76</a><span class="c">//</span>
<a class="l" name="77" href="#77">77</a><span class="c">// module: scarv_cop_cprs</span>
<a class="l" name="78" href="#78">78</a><span class="c">//</span>
<a class="l" name="79" href="#79">79</a><span class="c">//  The general purpose register file used by the COP.</span>
<a class="hl" name="80" href="#80">80</a><span class="c">//</span>
<a class="l" name="81" href="#81">81</a><b>module</b> <a class="d" name="scarv_cop_cprs"/><a href="/source/s?refs=scarv_cop_cprs" class="d intelliWindow-symbol" data-definition-place="def">scarv_cop_cprs</a> (
<a class="l" name="82" href="#82">82</a>
<a class="l" name="83" href="#83">83</a><b>input</b>  <b>wire</b>             <a class="d" name="g_clk"/><a href="/source/s?refs=g_clk" class="d intelliWindow-symbol" data-definition-place="def">g_clk</a>         , <span class="c">// Global clock</span>
<a class="l" name="84" href="#84">84</a><b>output</b> <b>wire</b>             <a class="d" name="g_clk_req"/><a href="/source/s?refs=g_clk_req" class="d intelliWindow-symbol" data-definition-place="def">g_clk_req</a>     , <span class="c">// Clock request</span>
<a class="l" name="85" href="#85">85</a><b>input</b>  <b>wire</b>             <a class="d" name="g_resetn"/><a href="/source/s?refs=g_resetn" class="d intelliWindow-symbol" data-definition-place="def">g_resetn</a>      , <span class="c">// Synchronous active low reset.</span>
<a class="l" name="86" href="#86">86</a>
<a class="l" name="87" href="#87">87</a><b>`ifdef</b> <a href="/source/s?defs=FORMAL" class="intelliWindow-symbol" data-definition-place="undefined-in-file">FORMAL</a>
<a class="l" name="88" href="#88">88</a><a href="/source/s?defs=%60VTX_REGISTER_PORTS_OUT" class="intelliWindow-symbol" data-definition-place="undefined-in-file">`VTX_REGISTER_PORTS_OUT</a>(<a href="/source/s?defs=cprs_snoop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cprs_snoop</a>)
<a class="l" name="89" href="#89">89</a><b>`endif</b>
<a class="hl" name="90" href="#90">90</a>
<a class="l" name="91" href="#91">91</a><b>input</b>  <b>wire</b>             <a class="d" name="crs1_ren"/><a href="/source/s?refs=crs1_ren" class="d intelliWindow-symbol" data-definition-place="def">crs1_ren</a>      , <span class="c">// Port 1 read enable</span>
<a class="l" name="92" href="#92">92</a><b>input</b>  <b>wire</b> [ <span class="n">3</span>:<span class="n">0</span>]      <a class="d" name="crs1_addr"/><a href="/source/s?refs=crs1_addr" class="d intelliWindow-symbol" data-definition-place="def">crs1_addr</a>     , <span class="c">// Port 1 address</span>
<a class="l" name="93" href="#93">93</a><b>output</b> <b>wire</b> [<span class="n">31</span>:<span class="n">0</span>]      <a class="d" name="crs1_rdata"/><a href="/source/s?refs=crs1_rdata" class="d intelliWindow-symbol" data-definition-place="def">crs1_rdata</a>    , <span class="c">// Port 1 read data</span>
<a class="l" name="94" href="#94">94</a>
<a class="l" name="95" href="#95">95</a><b>input</b>  <b>wire</b>             <a class="d" name="crs2_ren"/><a href="/source/s?refs=crs2_ren" class="d intelliWindow-symbol" data-definition-place="def">crs2_ren</a>      , <span class="c">// Port 2 read enable</span>
<a class="l" name="96" href="#96">96</a><b>input</b>  <b>wire</b> [ <span class="n">3</span>:<span class="n">0</span>]      <a class="d" name="crs2_addr"/><a href="/source/s?refs=crs2_addr" class="d intelliWindow-symbol" data-definition-place="def">crs2_addr</a>     , <span class="c">// Port 2 address</span>
<a class="l" name="97" href="#97">97</a><b>output</b> <b>wire</b> [<span class="n">31</span>:<span class="n">0</span>]      <a class="d" name="crs2_rdata"/><a href="/source/s?refs=crs2_rdata" class="d intelliWindow-symbol" data-definition-place="def">crs2_rdata</a>    , <span class="c">// Port 2 read data</span>
<a class="l" name="98" href="#98">98</a>
<a class="l" name="99" href="#99">99</a><b>input</b>  <b>wire</b>             <a class="d" name="crs3_ren"/><a href="/source/s?refs=crs3_ren" class="d intelliWindow-symbol" data-definition-place="def">crs3_ren</a>      , <span class="c">// Port 3 read enable</span>
<a class="hl" name="100" href="#100">100</a><b>input</b>  <b>wire</b> [ <span class="n">3</span>:<span class="n">0</span>]      <a class="d" name="crs3_addr"/><a href="/source/s?refs=crs3_addr" class="d intelliWindow-symbol" data-definition-place="def">crs3_addr</a>     , <span class="c">// Port 3 address</span>
<a class="l" name="101" href="#101">101</a><b>output</b> <b>wire</b> [<span class="n">31</span>:<span class="n">0</span>]      <a class="d" name="crs3_rdata"/><a href="/source/s?refs=crs3_rdata" class="d intelliWindow-symbol" data-definition-place="def">crs3_rdata</a>    , <span class="c">// Port 3 read data</span>
<a class="l" name="102" href="#102">102</a>
<a class="l" name="103" href="#103">103</a><b>input</b>  <b>wire</b> [ <span class="n">3</span>:<span class="n">0</span>]      <a class="d" name="crd_wen"/><a href="/source/s?refs=crd_wen" class="d intelliWindow-symbol" data-definition-place="def">crd_wen</a>       , <span class="c">// Port 4 write enable</span>
<a class="l" name="104" href="#104">104</a><b>input</b>  <b>wire</b> [ <span class="n">3</span>:<span class="n">0</span>]      <a class="d" name="crd_addr"/><a href="/source/s?refs=crd_addr" class="d intelliWindow-symbol" data-definition-place="def">crd_addr</a>      , <span class="c">// Port 4 address</span>
<a class="l" name="105" href="#105">105</a><b>input</b>  <b>wire</b> [<span class="n">31</span>:<span class="n">0</span>]      <a class="d" name="crd_wdata"/><a href="/source/s?refs=crd_wdata" class="d intelliWindow-symbol" data-definition-place="def">crd_wdata</a>       <span class="c">// Port 4 write data</span>
<a class="l" name="106" href="#106">106</a>
<a class="l" name="107" href="#107">107</a>);
<a class="l" name="108" href="#108">108</a>
<a class="l" name="109" href="#109">109</a><span class="c">// Only need a clock when doing a write.</span>
<a class="hl" name="110" href="#110">110</a><b>assign</b> <a class="d intelliWindow-symbol" href="#g_clk_req" data-definition-place="defined-in-file">g_clk_req</a> = <a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>;
<a class="l" name="111" href="#111">111</a>
<a class="l" name="112" href="#112">112</a><span class="c">// Storage for the registers</span>
<a class="l" name="113" href="#113">113</a><b>reg</b> [<span class="n">31</span>:<span class="n">0</span>] <a class="d" name="cprs"/><a href="/source/s?refs=cprs" class="d intelliWindow-symbol" data-definition-place="def">cprs</a> [<span class="n">15</span>:<span class="n">0</span>];
<a class="l" name="114" href="#114">114</a>
<a class="l" name="115" href="#115">115</a><b>`ifdef</b> <a href="/source/s?defs=FORMAL" class="intelliWindow-symbol" data-definition-place="undefined-in-file">FORMAL</a>
<a class="l" name="116" href="#116">116</a><a href="/source/s?defs=%60VTX_REGISTER_PORTS_ASSIGNR" class="intelliWindow-symbol" data-definition-place="undefined-in-file">`VTX_REGISTER_PORTS_ASSIGNR</a>(<a href="/source/s?defs=cprs_snoop" class="intelliWindow-symbol" data-definition-place="undefined-in-file">cprs_snoop</a>,<a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>)
<a class="l" name="117" href="#117">117</a><b>`endif</b>
<a class="l" name="118" href="#118">118</a>
<a class="l" name="119" href="#119">119</a><span class="c">//</span>
<a class="hl" name="120" href="#120">120</a><span class="c">// Read port logic</span>
<a class="l" name="121" href="#121">121</a><span class="c">//</span>
<a class="l" name="122" href="#122">122</a>
<a class="l" name="123" href="#123">123</a><b>assign</b> <a class="d intelliWindow-symbol" href="#crs1_rdata" data-definition-place="defined-in-file">crs1_rdata</a> = {<span class="n">32</span>{<a class="d intelliWindow-symbol" href="#crs1_ren" data-definition-place="defined-in-file">crs1_ren</a>}} &amp; <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#crs1_addr" data-definition-place="defined-in-file">crs1_addr</a>];
<a class="l" name="124" href="#124">124</a><b>assign</b> <a class="d intelliWindow-symbol" href="#crs2_rdata" data-definition-place="defined-in-file">crs2_rdata</a> = {<span class="n">32</span>{<a class="d intelliWindow-symbol" href="#crs2_ren" data-definition-place="defined-in-file">crs2_ren</a>}} &amp; <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#crs2_addr" data-definition-place="defined-in-file">crs2_addr</a>];
<a class="l" name="125" href="#125">125</a><b>assign</b> <a class="d intelliWindow-symbol" href="#crs3_rdata" data-definition-place="defined-in-file">crs3_rdata</a> = {<span class="n">32</span>{<a class="d intelliWindow-symbol" href="#crs3_ren" data-definition-place="defined-in-file">crs3_ren</a>}} &amp; <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#crs3_addr" data-definition-place="defined-in-file">crs3_addr</a>];
<a class="l" name="126" href="#126">126</a>
<a class="l" name="127" href="#127">127</a><span class="c">//</span>
<a class="l" name="128" href="#128">128</a><span class="c">// Generate logic for each register.</span>
<a class="l" name="129" href="#129">129</a><span class="c">//</span>
<a class="hl" name="130" href="#130">130</a><b>genvar</b> <a class="d" name="i"/><a href="/source/s?refs=i" class="d intelliWindow-symbol" data-definition-place="def">i</a>;
<a class="l" name="131" href="#131">131</a><b>generate</b> <b>for</b> (<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a> = <span class="n">0</span>; <a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a> &lt; <span class="n">16</span>; <a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a> = <a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a> + <span class="n">1</span>) <b>begin</b> : <a class="d" name="gen_cprs"/><a href="/source/s?refs=gen_cprs" class="d intelliWindow-symbol" data-definition-place="def">gen_cprs</a>
<a class="l" name="132" href="#132">132</a>
<a class="l" name="133" href="#133">133</a>    <b>always</b> @(<b>posedge</b> <a class="d intelliWindow-symbol" href="#g_clk" data-definition-place="defined-in-file">g_clk</a>) <b>begin</b>
<a class="l" name="134" href="#134">134</a>
<a class="l" name="135" href="#135">135</a>        <b>if</b>(!<a class="d intelliWindow-symbol" href="#g_resetn" data-definition-place="defined-in-file">g_resetn</a>) <b>begin</b>
<a class="l" name="136" href="#136">136</a>            <b>`ifdef</b> <a href="/source/s?defs=FORMAL" class="intelliWindow-symbol" data-definition-place="undefined-in-file">FORMAL</a>
<a class="l" name="137" href="#137">137</a>                <span class="c">// If running the yosys formal flow, allow initial</span>
<a class="l" name="138" href="#138">138</a>                <span class="c">// register values to be any constant value.</span>
<a class="l" name="139" href="#139">139</a>                <span class="n">#1</span> <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>] &lt;= <a href="/source/s?defs=%24anyconst" class="intelliWindow-symbol" data-definition-place="undefined-in-file">$anyconst</a>;
<a class="hl" name="140" href="#140">140</a>            <b>`else</b>
<a class="l" name="141" href="#141">141</a>                <span class="n">#1step</span> <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>] &lt;= <span class="n">32&apos;b0</span>;
<a class="l" name="142" href="#142">142</a>            <b>`endif</b>
<a class="l" name="143" href="#143">143</a>
<a class="l" name="144" href="#144">144</a>        <b>end</b> <b>else</b> <b>if</b>((|<a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>) &amp;&amp; (<a class="d intelliWindow-symbol" href="#crd_addr" data-definition-place="defined-in-file">crd_addr</a> == <a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>)) <b>begin</b>
<a class="l" name="145" href="#145">145</a>            <b>if</b>(<a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>[<span class="n">3</span>]) <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>][<span class="n">31</span>:<span class="n">24</span>] &lt;= <a class="d intelliWindow-symbol" href="#crd_wdata" data-definition-place="defined-in-file">crd_wdata</a>[<span class="n">31</span>:<span class="n">24</span>];
<a class="l" name="146" href="#146">146</a>            <b>if</b>(<a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>[<span class="n">2</span>]) <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>][<span class="n">23</span>:<span class="n">16</span>] &lt;= <a class="d intelliWindow-symbol" href="#crd_wdata" data-definition-place="defined-in-file">crd_wdata</a>[<span class="n">23</span>:<span class="n">16</span>];
<a class="l" name="147" href="#147">147</a>            <b>if</b>(<a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>[<span class="n">1</span>]) <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>][<span class="n">15</span>: <span class="n">8</span>] &lt;= <a class="d intelliWindow-symbol" href="#crd_wdata" data-definition-place="defined-in-file">crd_wdata</a>[<span class="n">15</span>: <span class="n">8</span>];
<a class="l" name="148" href="#148">148</a>            <b>if</b>(<a class="d intelliWindow-symbol" href="#crd_wen" data-definition-place="defined-in-file">crd_wen</a>[<span class="n">0</span>]) <a class="d intelliWindow-symbol" href="#cprs" data-definition-place="defined-in-file">cprs</a>[<a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>][ <span class="n">7</span>: <span class="n">0</span>] &lt;= <a class="d intelliWindow-symbol" href="#crd_wdata" data-definition-place="defined-in-file">crd_wdata</a>[ <span class="n">7</span>: <span class="n">0</span>];
<a class="l" name="149" href="#149">149</a>        <b>end</b>
<a class="hl" name="150" href="#150">150</a>
<a class="l" name="151" href="#151">151</a>    <b>end</b>
<a class="l" name="152" href="#152">152</a>
<a class="l" name="153" href="#153">153</a><b>end</b> <b>endgenerate</b>
<a class="l" name="154" href="#154">154</a>
<a class="l" name="155" href="#155">155</a><b>endmodule</b>
<a class="l" name="156" href="#156">156</a></body>
</html>
